//package me.shiqiang.im.repository;
//
//import me.shiqiang.im.domain.GroupChangeLog;
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.data.repository.CrudRepository;
//import org.springframework.data.repository.query.Param;
//import org.springframework.stereotype.Repository;
//
//import java.util.List;
//import java.util.Map;
//
///**
// * Created by John on 2018/5/30
// */
////@Repository
//public interface GroupChangeLogRepository extends CrudRepository<GroupChangeLog, Long> {
//
//
//    List<GroupChangeLog> findByGroupIdAndVersionGreaterThanAndUserIdNotNull(Long groupId, Long version);
//
//    @Query(value="select max(version) from t_group_change_log where group_id =:groupId", nativeQuery = true)
//    Long getCurrentVersionByGroupId(@Param("groupId") Long groupId);
//
//
//    @Query(value="select min(version) from t_group_change_log where group_id =:groupId", nativeQuery = true)
//    Long getMinimumVersionByGroupId(@Param("groupId") Long groupId);
//
//    @Query(value="select min(version) as minVersion, max(version) as maxVersion from GroupChangeLog where groupId =:groupId")
//    Map getMinAndMaxVersionByGroupId(@Param("groupId") Long groupId);
//
//
//}
